<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>巴士班次查询</title>
    <style>
        /* Reset and base styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f5f5f5;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            position: relative;
            padding-bottom: 60px; /* Space for bottom nav */
        }
        
        /* Manga/Comic Style Elements */
        .manga-header {
            background-color: white;
            border-bottom: 3px solid black;
            padding: 15px;
            text-align: center;
            position: relative;
        }
        
        .manga-title {
            font-size: 20px;
            font-weight: 900;
            letter-spacing: 1px;
        }
        
        .manga-container {
            padding: 20px;
            max-width: 600px;
            margin: 0 auto;
            width: 100%;
        }
        
        .manga-panel {
            background-color: white;
            border: 3px solid black;
            padding: 20px;
            position: relative;
            overflow: hidden;
            box-shadow: 5px 5px 0 #000;
            margin-bottom: 20px;
        }
        
        /* Corner decoration */
        .manga-panel::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 30px;
            height: 30px;
            background-color: black;
            clip-path: polygon(100% 0, 0 0, 100% 100%);
        }
        
        .manga-panel-title {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 15px;
            text-align: center;
        }
        
        .manga-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .form-group {
            display: flex;
            flex-direction: column;
        }
        
        .manga-label {
            font-weight: bold;
            margin-bottom: 5px;
        }
        
        .manga-input {
            padding: 10px;
            border: 2px solid black;
            font-size: 14px;
        }
        
        .manga-input:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3);
        }
        
        .manga-button {
            padding: 10px 15px;
            background-color: black;
            color: white;
            font-weight: bold;
            font-size: 14px;
            border: none;
            cursor: pointer;
            transition: transform 0.2s;
            box-shadow: 3px 3px 0 #666;
            margin-top: 10px;
        }
        
        .manga-button:hover {
            transform: scale(1.05);
        }
        
        .manga-button:active {
            transform: scale(0.95);
            box-shadow: 1px 1px 0 #666;
        }
        
        .manga-schedule-list {
            margin-top: 20px;
            display: none;
        }
        
        .manga-schedule-item {
            border: 2px solid black;
            margin-bottom: 10px;
            padding: 15px;
            position: relative;
        }
        
        .manga-schedule-item:hover {
            background-color: #f9f9f9;
        }
        
        .manga-schedule-route {
            font-weight: bold;
            font-size: 16px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .manga-schedule-route::after {
            content: '→';
            margin: 0 10px;
        }
        
        .manga-schedule-details {
            display: flex;
            justify-content: space-between;
            font-size: 14px;
        }
        
        .manga-schedule-time {
            display: flex;
            flex-direction: column;
        }
        
        .manga-schedule-time span {
            margin-bottom: 5px;
        }
        
        .manga-schedule-price {
            font-weight: bold;
            align-self: flex-end;
        }
        
        .manga-select-button {
            background-color: black;
            color: white;
            padding: 8px 12px;
            font-size: 12px;
            font-weight: bold;
            border: none;
            cursor: pointer;
            margin-top: 10px;
            width: 100%;
        }
        
        .manga-bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            background-color: white;
            border-top: 3px solid black;
            display: flex;
            height: 60px;
        }
        
        .manga-nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 8px;
            font-size: 12px;
            font-weight: bold;
            cursor: pointer;
        }
        
        .manga-nav-item.active {
            background-color: #f0f0f0;
        }
        
        .manga-nav-icon {
            width: 24px;
            height: 24px;
            margin-bottom: 4px;
        }
        
        .no-results {
            text-align: center;
            padding: 20px;
            font-weight: bold;
            display: none;
        }
    </style>
</head>
<body>
    <!-- Header -->
    <header class="manga-header">
        <h1 class="manga-title">巴士班次查询</h1>
    </header>

    <div class="manga-container">
        <!-- Search Panel -->
        <div class="manga-panel">
            <h2 class="manga-panel-title">查询班次</h2>
            <form class="manga-form" id="search-form">
                <div class="form-group">
                    <label class="manga-label">出发地：</label>
                    <input type="text" class="manga-input" id="origin" placeholder="请输入出发城市">
                </div>
                <div class="form-group">
                    <label class="manga-label">目的地：</label>
                    <input type="text" class="manga-input" id="destination" placeholder="请输入目的城市">
                </div>
                <button type="submit" class="manga-button">查询班次</button>
            </form>
        </div>

        <!-- Schedule Results -->
        <div class="manga-panel manga-schedule-list" id="schedule-results">
            <h2 class="manga-panel-title">班次列表</h2>
            
            <div class="manga-schedule-item">
                <div class="manga-schedule-route">
                    <span id="route-origin">北京</span>
                    <span id="route-destination">上海</span>
                </div>
                <div class="manga-schedule-details">
                    <div class="manga-schedule-time">
                        <span>发车时间: 08:00</span>
                        <span>到达时间: 14:30</span>
                        <span>车型: 豪华大巴</span>
                    </div>
                    <div class="manga-schedule-price">
                        ¥553.00
                    </div>
                </div>
                <button class="manga-select-button">选择此班次</button>
            </div>
            
            <div class="manga-schedule-item">
                <div class="manga-schedule-route">
                    <span id="route-origin">北京</span>
                    <span id="route-destination">上海</span>
                </div>
                <div class="manga-schedule-details">
                    <div class="manga-schedule-time">
                        <span>发车时间: 12:30</span>
                        <span>到达时间: 19:00</span>
                        <span>车型: 标准大巴</span>
                    </div>
                    <div class="manga-schedule-price">
                        ¥499.00
                    </div>
                </div>
                <button class="manga-select-button">选择此班次</button>
            </div>
            
            <div class="manga-schedule-item">
                <div class="manga-schedule-route">
                    <span id="route-origin">北京</span>
                    <span id="route-destination">上海</span>
                </div>
                <div class="manga-schedule-details">
                    <div class="manga-schedule-time">
                        <span>发车时间: 20:00</span>
                        <span>到达时间: 06:30</span>
                        <span>车型: 卧铺大巴</span>
                    </div>
                    <div class="manga-schedule-price">
                        ¥650.00
                    </div>
                </div>
                <button class="manga-select-button">选择此班次</button>
            </div>
        </div>
        
        <!-- No Results Message -->
        <div class="manga-panel no-results" id="no-results">
            <p>没有找到符合条件的班次，请尝试其他路线。</p>
        </div>
    </div>

    <!-- Bottom Navigation -->
    <nav class="manga-bottom-nav">
        <div class="manga-nav-item active">
            <svg class="manga-nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect>
                <path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path>
            </svg>
            <span>班次查询</span>
        </div>
        <div class="manga-nav-item">
            <svg class="manga-nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path>
                <line x1="3" y1="6" x2="21" y2="6"></line>
                <path d="M16 10a4 4 0 0 1-8 0"></path>
            </svg>
            <span>我的订单</span>
        </div>
        <div class="manga-nav-item">
            <svg class="manga-nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
                <circle cx="12" cy="7" r="4"></circle>
            </svg>
            <span>个人中心</span>
        </div>
    </nav>

    <script>
        // Form submission
        const searchForm = document.getElementById('search-form');
        const scheduleResults = document.getElementById('schedule-results');
        const noResults = document.getElementById('no-results');
        const originInput = document.getElementById('origin');
        const destinationInput = document.getElementById('destination');
        
        searchForm.addEventListener('submit', function(event) {
            event.preventDefault();
            
            const origin = originInput.value.trim();
            const destination = destinationInput.value.trim();
            
            if (!origin || !destination) {
                alert('请输入出发地和目的地');
                return;
            }
            
            // Update route display in results
            const routeOrigins = document.querySelectorAll('#route-origin');
            const routeDestinations = document.querySelectorAll('#route-destination');
            
            routeOrigins.forEach(el => {
                el.textContent = origin;
            });
            
            routeDestinations.forEach(el => {
                el.textContent = destination;
            });
            
            // Show results (in a real app, you would fetch from an API)
            if ((origin === '北京' && destination === '上海') || 
                (origin === '上海' && destination === '北京')) {
                scheduleResults.style.display = 'block';
                noResults.style.display = 'none';
            } else {
                scheduleResults.style.display = 'none';
                noResults.style.display = 'block';
            }
        });
        
        // Select button functionality
        const selectButtons = document.querySelectorAll('.manga-select-button');
        
        selectButtons.forEach(button => {
            button.addEventListener('click', function() {
                const scheduleItem = this.closest('.manga-schedule-item');
                const route = scheduleItem.querySelector('.manga-schedule-route').textContent;
                const time = scheduleItem.querySelector('.manga-schedule-time').textContent;
                const price = scheduleItem.querySelector('.manga-schedule-price').textContent;
                
                alert(`您已选择: ${route}\n${time}\n价格: ${price}\n即将跳转到订票页面...`);
            });
        });
        
        // Bottom navigation
        const navItems = document.querySelectorAll('.manga-nav-item');
        
        navItems.forEach(item => {
            item.addEventListener('click', function() {
                navItems.forEach(nav => nav.classList.remove('active'));
                this.classList.add('active');
                
                const navText = this.querySelector('span').textContent;
                
                if (navText === '我的订单') {
                    alert('即将跳转到我的订单页面...');
                } else if (navText === '个人中心') {
                    alert('即将跳转到个人中心页面...');
                }
            });
        });
        
        // Add some visual feedback on hover
        const scheduleItems = document.querySelectorAll('.manga-schedule-item');
        
        scheduleItems.forEach(item => {
            item.addEventListener('mouseover', function() {
                this.style.transform = 'scale(1.01)';
                this.style.transition = 'transform 0.2s';
            });
            
            item.addEventListener('mouseout', function() {
                this.style.transform = 'scale(1)';
            });
        });
    </script>
</body>
</html>